
package com.joysuch.wwyt.edu.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.joysuch.wwyt.core.bean.BpUserSearchBean;
import com.joysuch.wwyt.core.common.ajax.ResultBean;
import com.joysuch.wwyt.edu.bean.*;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @Author ZhangDong
 * @Date 2020/6/24 17:38
 */
public interface EduCourseStatisticsService {

    ResultBean learnTime(Long courseawareId, Integer learnTime, Integer lastTime, Integer state,Long trainingId);

    void addExamCount(EduDoExamResultBean resultBean,Long examId, Long currentUserId,boolean isExamCount ,boolean passed, boolean isFirstExam);

    ResultBean examCountQuery();

    ResultBean examStatistics();

    ResultBean eduExamJoinRate();

    ResultBean recordQuery(String userName);

    ResultBean examQueryPage(EduExamQueryBean bean);

    ResultBean examRecordDetail(Long examId, SearchEduExamRecordDetailBean condition, Pageable pageable);

    ResultBean allStudyQuery(Pageable pageable);

    ResultBean userExamRecordPage(Long userId, Pageable pageable);

    ResultBean userExamRecordNewPage(Long userId, Pageable pageable);

    ResultBean examAbsentQuery(Long examId);

    void examRecordExcel(Long examId, HttpServletRequest request, HttpServletResponse response);

    ResultBean learnHistory(EduCourseLearnHistoryBean bean);

    ResultBean userLearnHistory(EduLearnHistoryBean bean);

    EduExamJoinUserListBean getExamRecordUserInfo(Long examRecordId);

    ResultBean courseList(Pageable pageable);

    /**
     * 根据userid 查询已学习的课件
     *
     * @param userId 用户id
     * @return
     */
    List<Long> selectCoursewareLearnedByUserId(Long userId);

    ResultBean learnerCourseStatistics(Long courseId, BpUserSearchBean condition, Pageable pageable);

    void learnerCourseStatisticsExport(Long courseId, BpUserSearchBean condition, HttpServletRequest request, HttpServletResponse response);

    /**
     * 学习文档课件
     * @param courseawareId
     * @param learnTime
     * @param isReturn
     * @return
     */
    ResultBean learnDocument(Long courseawareId, Integer learnTime, Integer isReturn, String uuid,Long trainingId);

    /**
     * 从redis读取数据
     */
    void saveLearnHistory();

}
